Skip to content

test: improve validation request body helpers#175

Merged
ssncferreira merged 1 commit intomainfrom
ssncf/test-validate-request-body
Feb 10, 2026
Merged

test: improve validation request body helpers#175
ssncferreira merged 1 commit intomainfrom
ssncf/test-validate-request-body

Conversation

@ssncferreira
Copy link
Contributor

@ssncferreira ssncferreira commented Feb 6, 2026

Improves the request body validation helpers in integration tests.
Follow-up from: #164

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ssncferreira ssncferreira force-pushed the ssncf/test-validate-request-body branch from feb9bf5 to 4ad05de Compare February 9, 2026 18:56
@ssncferreira ssncferreira marked this pull request as ready for review February 9, 2026 19:55
// has all required fields.
// According to OpenAI documentation https://platform.openai.com/docs/api-reference/chat/create,
// the "model" and "messages" fields are required.
// Returns an error if validation fails.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably misunderstood something but his comment says that:

the "model" and "messages" fields are required.

While below for responses:

no fields are strictly required.

but the code here doesn't check this while in responses it does.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, so according to the OpenAI API documentation on chat creation model and messages are required fields. But according to the OpenAI API documentation on responses creation no fields are required, but AFAIK both the model and input fields are generally set. The purpose of these functions is to validate that AIBridge is sending valid request bodies

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but the code here doesn't check this while in responses it does.

Ah nvm it is checked just github collapses code without changes...

@ssncferreira ssncferreira merged commit 9d5df2e into main Feb 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants